package exemplo;

import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;

public class Principal {


	
	public static void leituraReader() throws IOException{
		int a = 'f';
				InputStreamReader in = new InputStreamReader(System.in);
		  System.out.println("testeeeeee");
		char c = ' ';
		while(c != 'Q'){c = (char) in.read();}
		System.out.println("FIM DE LEITURA");}	
	public static void leituraScanner() throws IOException{	
		Scanner s = new Scanner(System.in);
		String c = "";
		while(!c.equals("Q")){c = s.next();}
		System.out.println("FIM DE LEITURA");}
	public static void main(String[] args)  throws IOException{	
		leituraReader();leituraScanner();
	}}
